import { defineStore } from 'pinia';
import { ref } from 'vue';

const useResumeStore = defineStore('resume', () => {
  const uploadResumeFiles = ref<string[]>([])

  const setUploadResumeFiles = (files: string[], action?: string) => {
    if (action === 'add') {
      uploadResumeFiles.value.push(...files)
      return
    }
    uploadResumeFiles.value = files
  }

  return {
    uploadResumeFiles,
    setUploadResumeFiles
  }
})

export default useResumeStore